<p>&nbsp;</p>
<?php echo validation_errors(); ?>
<form method="post">
    <div>
        <label for="txt-username">Username</label>
        <input type="text" name="username" id="txt-username" value="<?php echo (!empty($user['username']) ? $user['username'] : set_value('username')) ?>" />
    </div>
    <div>
        <label for="txt-password">Password</label>
        <input type="password" name="password" id="txt-password" value="<?php echo set_value('password') ?>" />
    </div>
    <div>
        <label for="txt-repassword">Confirm Password</label>
        <input type="password" name="repassword" id="txt-repassword" value="<?php echo set_value('repassword') ?>" />
    </div>
    <div>
        <label for="txt-status">Status</label>
        <select id="txt-status" name="status">
            <option value="">--Status--</option>
            <option value="1"<?php echo (isset($user['status']) && ($user['status'] == "1") ? " selected=\"selected\"" : "") ?>>Active</option>
            <option value="0"<?php echo (isset($user['status']) && ($user['status'] == "0") ? " selected=\"selected\"" : "") ?>>Non active</option>
        </select>
    </div>
    <?php
    if (!empty($user['id'])) {
        ?>
        <input type="hidden" name="id" value="<?php echo $user['id']; ?>" />
        <?php
    }
    ?>
    <div class="submit">
        <input type="submit" name="submit" value="<?php echo (!empty($user['id']) ? "Update" : "Insert") ?>" />
    </div>
</form>
<p>&nbsp;</p>